import api from '@/api';
import { array } from 'prop-types';

export default {
  namespace: 'sysSet',

  state: {
    appId: {},
  },

  effects: {
    *queryAppId(_, { call, put }) {
      return yield call(api.sysSet.appId);
    },
    *resetSecret(_, { call, put }) {
      return yield call(api.sysSet.resetSecret);
    },
    *updateAgent({ payload }, { call, put }) {
      return yield call(api.sysSet.updateAgentUser, payload);
    },
  },

  reducers: {
    saveBookingDetail(state, { payload }) {
      return {
        ...state,
        bookingDetail: payload,
      };
    },
  },
};
